{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "cd ../"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "run startup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "q1 = QubitFactory(\"q1\")  #initialize qubit, e.g. \"q1\", \"q2\", etc.\n",
    "q2 = QubitFactory(\"q2\")\n",
    "CR = QubitFactory(\"CR12\") #drive for CR gate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "showPlot = False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\"\"\" Simultaneous drive and/or measurement \"\"\"\n",
    "RabiPoints = 101;\n",
    "DoRabiQ1 = 1; DoMeasQ1 = 1;  #select combination of drive and measurement pulses to check for crosstalk\n",
    "DoRabiQ2 = 1; DoMeasQ2 = 1;\n",
    "RabiAmp_TwoQubits(q1,q2,DoRabiQ1*np.linspace(0,1,RabiPoints), DoRabiQ2*np.linspace(0,1,RabiPoints),docals=1,meas=[DoMeasQ1,DoMeasQ2],showPlot=showPlot)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\"\"\" Two-qubit gates (in progress) \"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\"\"\" Pi-Rabi sequence with variable length CR pulse \"\"\"\n",
    "PiRabi(q2,q1,CR,20e-9*np.arange(2,51),showPlot=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\"\"\" Echo-CR sequence with variable length CR pulse \"\"\"\n",
    "EchoCRLen(q2,q1,CR,20e-9*np.arange(2,51),showPlot=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "\"\"\" Echo-CR sequence with variable phase CR pulse \"\"\"\n",
    "EchoCRPhase(q2,q1,CR,np.linspace(0,2*np.pi,60),length=20e-9, showPlot=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
